package org.tvolkov.mycompany

import grails.converters.JSON

class ProjectController {
	
	def projectService
	
	def list = {
		render projectService.getProjectList(params) as JSON;
	}
	
	def listall = {
		render projectService.getAllProjects() as JSON;
	}
	def add = {
		render projectService.addNewProject(params) as JSON;
	}
	
	def remove = {
		render projectService.removeProject(params) as JSON;
	}
	
	def details = {
		render projectService.getProjectDetails(params) as JSON;
	}
	
	def edit = {
		println("ProjectController: edit: params: " + params);
		render projectService.editProject(params) as JSON;
	}
}
